// 响应内容：应用ID + 应用名
export interface AppItem {
  id: string;
  createdTime: string;
  createdBy: string;
  lastUpdateTime: string;
  lastUpdateBy: string;
  isDel: boolean;
  name: string;
  logo: string;
  oneaccessAppId: string;
  oneaccessClientId: string;
  type: number;
}

// 请求参数：根据所选应用，获取所有租户/应用下组件
export type AppDto = {
  appId: string;
  requestType: string;
};

// 响应内容：租户基本信息
export interface TenantItem {
  id: string;
  createdTime: string;
  createdBy?: any;
  lastUpdateTime: string;
  lastUpdateBy: string;
  isDel: boolean;
  oneaccessTenantId: string;
  name: string;
  code: string;
  status?: any;
  isBuiltIn: boolean;
  phone: string;
  customerId?: any;
  customerName?: any;
  consoleStatus: string;
  cmAccessKey?: any;
  imcTenantCode?: any;
  imcName?: any;
  imcDomainName?: any;
}

// 请求参数：根据所选应用+租户，获取租户购买本应用的套餐类型
export type AppTenantDto = {
  appId: string;
  tenantCode: string;
};

// 响应内容：套餐ID + 套餐类型
export interface InstanceItem {
  id: string;
  type: string;
}

// 响应内容：组件ID + 组件名
export interface ComponentItem {
  id: string;
  name: string;
}

// 请求参数：应用 + 租户 + 套餐 + 组件
export type DeployInfoQueryParams = {
  appId: string;
  tenantCode: string;
  packageId: string;
  componentId: string;
};

// 响应内容：命名空间 + 当前工作负载 + 当前镜像 + 当前组件版本
export interface CceInfo {
  namespace: string;
  previousVersion: string;
  previousDeployment: string;
  currentDeployment: string;
  currentImageId: string;
  currentVersion: string;
}

// 请求参数：根据应用 + 组件，获取除当前镜像版本外的，可用于升级的镜像版本列表
export type AppCompParams = {
  appId: string;
  componentId: string;
};

// 响应内容：镜像ID + 镜像版本
export interface ImageItem {
  id: string;
  image: string;
  componentVersion: string;
}

// 请求参数：根据组件ID + 版本，获取镜像信息
export type CompParams = {
  componentId: string;
  componentVersion: string;
};
